package com.yt.order.service;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.BeanUtils;
import javax.annotation.Resource;
import com.yt.order.common.config.YmlConfig;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.yt.order.mapper.SysUserMapper;
import com.yt.order.models.service.ISysUserService;
import com.yt.order.models.bo.SysUserSaveBO;
import com.yt.order.models.dto.SysUserDTO;

/**
 * 用户详情控制器
 *
 * @author xieyanfei
 * @Date 2025-09-06 19:25:10
 */
@DubboService
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUserDTO> implements ISysUserService{

    @Resource
    private YmlConfig ymlConfig;

    @Override
    public boolean add(SysUserSaveBO saveBO) {
        SysUserDTO dto = new SysUserDTO();
        BeanUtils.copyProperties(saveBO,dto);
        Long id = ymlConfig.getPkId();
        dto.setId(id);
        return this.insert(dto);
    }
}
